{include_core file="admin/lib/header.html" title="密码修改"}
<div class="regi-con">
  <div class="regi-title clearfix">
    <h2 class="login-title" style="text-align:center;">{*<img src="../images/testlogo2.png" width="56" height="40">*}密码修改</h2>
  </div>
  <div class="regi-form">
    <form action="{AnUrl('user/admin/pass_save')}" method="post" class="js_registerForm">
      <input type="hidden" name='id' value="{$id}">
      <table cellpadding="0" cellspacing="0">
        <tr>
          <th><label for="">原始密码：</label></th>
          <td data-type="pwd"><p><input type="password" class="js_registerInfo js_oldPostInfo" name="oldpassword" value=""><span>*</span></p>
              <p class="tips">原始密码不能为空</p>
          </td>
        </tr>
        <tr>
          <th><label for="">新密码：</label></th>
          <td data-type="pwd"><p><input type="password" class="js_registerInfo js_pwd js_registerPostInfo" name="password" value=""><span>*</span></p>
              <p class="tips">密码最少6位</p>
          </td>
        </tr>
        <tr>
          <th><label for="">确认密码：</label></th>
          <td data-type="repwd"><p><input class="js_registerInfo js_repwd js_registerPostInfo" type="password" name="repassword" value=""><span>*</span></p></td>
        </tr>
        <tr>
          <th></th>
          <td><button type="submit" class="btn btn-success js_registerSubmit">&nbsp;&nbsp;确&nbsp;定&nbsp;&nbsp;</button></td>
        </tr>
      </table>
    </form>
  </div>
</div>
<script>

$(function(){
  // 提交验证
  $('.js_registerSubmit').click(function(e){
    e.preventDefault();
    if ($('.js_submit').attr('is_post') == 1) {
      showMsg('正在提交信息，请稍候 ...');
      return false;
    }
    
    var oldPwd          = $.trim($('.js_oldPostInfo').val());
    var registerPwd     = $.trim($('.js_pwd').val());
    var registerRepwd   = $.trim($('.js_repwd').val());
    
    if (!oldPwd) {
      showMsg('原始密码不能为空');
      return;
    }
    if (!registerPwd) {
      showMsg('密码不能为空');
      return;
    }
    if (registerPwd.length < 6) {
      showMsg('密码长度过短');
      return;
    }
  
    if (!registerRepwd) {
      showMsg('确认密码不能为空');
      return;
    }
    if (registerPwd != registerRepwd) {
      showMsg('密码输入不一致');
      return;
    }
    
    if(is_pwd_null(registerPwd)) {
      showMsg('密码内不能存在空字符');
      return;
    }
    
    $('.js_submit').attr('is_post', 1);

    $('.js_registerForm').submit();

  });
});
</script>
{include_core file="admin/lib/footer.html"}